/**
 * 
 */
package org.dragonfire.editor.tibasic;

import org.dragonfire.editor.TIFileDocumentProvider;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.editors.text.TextEditor;

/**
 * @author Darth Android
 * @date Oct 8, 2007
 */
public class TIBasicSourceEditor extends TextEditor {

	private TIBasicEditor editor;

	public TIBasicSourceEditor(TIBasicEditor rootEditor, int calcType) {
		editor = rootEditor;
		setDocumentProvider(new TIFileDocumentProvider());
		setSourceViewerConfiguration(new TIBasicConfiguration(calcType));
	}

	public IDocument getDocument() {
		return getSourceViewer().getDocument();
	}

	public ISourceViewer getSource() {
		return getSourceViewer();
	}
}
